import { take, put, call, fork, select, takeEvery, all } from 'redux-saga/effects'
import * as actionTypes from './actionTypes';

export function* qwe (action) {
    try {
        console.error(123);
        yield put({type: actionTypes.ADD, num: action.num})
    } catch (e) {
        console.error(e.message);
        yield* put({type: actionTypes.ADD, num: action.num})
    }
}

export default function* mySaga() {
    yield takeEvery(actionTypes.SAGA_ADD, qwe);
}